<template>
  <view class="home">
    <!-- :style="{backgroundImage: 'url(' + bgImage +')'}" -->
    <view class="home-top">
      <view class="home-top-con">
        <view class="list" v-for="(item, index) in drawTop" :key="index" @click="drawTopClick(item)">
          <view class="img">
            <image :src="item.img"></image>
          </view>
          <view class="text">{{item.text}}</view>
        </view>
      </view>
      <view class="home-top-tab">
        <view class="home-top-tab-box">
          <view class="box" v-if="myInfo.rank >= 2" :class="{active: isSide == 'creator'}" @click="changeSide('creator')">创客中心</view>
          <view class="box" :style="{width: freeStore&&myInfo.rank < 2?'100%':'50%'}" :class="{active: isSide == 'shop'}" @click="changeSide('shop')">商户端</view>
        </view>
      </view>
    </view>
    <view class="home-new-cont">
      <view class="home-new-cont-top">
        <view class="title">
          <view>{{contText}}</view>
          <view class="common-tab">
            <view class="common-tab-text" :class="{active: dateType == 0}" @click="changeDate(0)">今日</view>
            <view class="common-tab-text" :class="{active: dateType == 1}" @click="changeDate(1)">本周</view>
            <view class="common-tab-text" :class="{active: dateType == 2}" @click="changeDate(2)">本月</view>
          </view>
        </view>
        <block v-if="isSide == 'shop' && shopData">
          <view class="card-box-top text-arr" @click="gatheringClick">
            <view class="text">
              <view>收款总营业额(元)</view>
              <image :src="$store.state.imgBaseUrl + '/why.png'" class="question" @click.stop="openExplain(3)"></image>
            </view>
            <view class="price">{{shopData.businessMoney}}</view>
          </view>
          <view class="card-box-bot">
            <view class="text-arr">
              <view class="text">
                <view>现金到账额(元)</view>
                <image :src="$store.state.imgBaseUrl + '/why.png'" class="question" @click.stop="openExplain(1)"></image>
              </view>
              <view class="price">{{shopData.receivedCashMoney}}</view>
            </view>
            <view class="line"></view>
            <view class="text-arr">
              <view class="text">
                <view>平台到账额(元)</view>
                <image :src="$store.state.imgBaseUrl + '/why.png'" class="question" @click.stop="openExplain(2)"></image>
              </view>
              <view class="price">{{shopData.receivedLocalMoney}}</view>
            </view>
          </view>
        </block>
        <block v-if="isSide != 'shop' && creatorData">
          <view class="card-box-bot" v-if="creatorData">
            <view class="text-arr" @click="haveReceive('today')">
              <view class="text">
                <view>{{dateType==0?'今日':dateType==1?'本周':'本月'}}收益(元)</view>
              </view>
              <view class="price">{{creatorData.haveReceiveMoney}}</view>
            </view>
            <view class="line"></view>
            <view class="text-arr" @click="haveReceive('predict')">
              <view class="text">
                <view>预计收益(元)</view>
                <image :src="$store.state.imgBaseUrl + '/why.png'" class="question" @click.stop="openExplain(0)"></image>
              </view>
              <view class="price">{{creatorData.willReceivedMoney}}</view>
            </view>
          </view>
        </block>
      </view>
      <div class="line2 line2-top" v-if="isSide == 'shop' && shopData">
        <view class="texts">付款笔数 <view class="texts2">{{shopData.receiveNum}}</view></view>
        <view class="line"></view>
        <view class="texts">付款人数 <view class="texts2">{{shopData.payerNum}}</view></view>
        <view class="line"></view>
        <view class="texts">客单价 <view class="texts2">{{shopData.averagePrice}}</view></view>
      </div>
    </view>
    <view class="mt20"></view>
    <block v-if="isSide == 'shop' && shopData">
      <view class="line3" style="margin-top: 28rpx;">
        <view class="line3-box" style="margin-right: 22rpx;" @click="hotMarket">
          <view class="img"><image :src="$store.state.imgBaseUrl + '/hot-1.png'"></image></view>
          <view class="text1">
            <view>爆品销售(单)</view> 
            <view class="val">{{shopData.hotSaleNum}}</view>
          </view>
        </view>
        <view class="line3-box" @click="hotVerify">
          <view class="img"><image :src="$store.state.imgBaseUrl + '/hot-2.png'"></image></view>
          <view class="text1">
            <view>爆品核销(单)</view>
            <view class="val">{{shopData.hotVerifyNum}}</view>
          </view>
        </view>
      </view>
      <view class="line3">
        <view class="line3-box" style="margin-right: 22rpx;" @click="hotMarket">
          <view class="img"><image :src="$store.state.imgBaseUrl + '/hot-3.png'"></image></view>
          <view class="text1">
            <view>爆品销售额(元)</view>
            <view class="val">{{shopData.hotSaleMoney}}</view>
          </view>
        </view>
        <view class="line3-box" @click="hotVerify">
          <view class="img"><image :src="$store.state.imgBaseUrl + '/hot-4.png'"></image></view>
          <view class="text1">
            <view>爆品收入(元)</view>
            <view class="val">{{shopData.hotVerifyMoney}}</view>
          </view>
        </view>
      </view>
    </block>
    <block v-if="isSide != 'shop' && creatorData">
      <view class="tag-line4" v-if="creatorData.noSettlementInfoVoList.length > 0" @click="showDetail">
        <view class="img"><image :src="$store.state.imgBaseUrl + '/msg.png'"></image></view>
        <view>部分收益因好友未补充相关资料，导致无法结算</view>
        <view class="arrow"><image :src="$store.state.imgBaseUrl + '/arrow1.png'"></image></view>
      </view>
      <view class="line6 line3-sp" v-if="creatorData.teamAddNum && creatorData.teamTotalNum">
        <view class="line6-nub">
          <view class="nub1">{{creatorData.teamAddNum}}</view>
          <view>团队新增（人）</view>
        </view>
        <!-- <view class="line6-rect"></view> -->
        <view class="line6-nub">
          <view class="nub1">{{creatorData.teamTotalNum}}</view>
          <view>团队总人数（人）</view>
        </view>	
      </view>
      <view class="line6 line6-sp">
        <view class="line6-nub" @click="directFriendsClick(1)">
          <view class="nub1">{{creatorData.directFriendsAddNum}}</view>
          <view>直接好友新增（人）</view>
        </view>
        <!-- <view class="line6-rect"></view> -->
        <view class="line6-nub" @click="directFriendsClick(2)">
          <view class="nub1">{{creatorData.directFriendsTotalNum }}</view>
          <view>直接好友总人数（人）</view>
        </view>
      </view>
      <view class="line5">
        <view class="line5-tit">以下数据均为直接推荐新增的好友</view>
        <scroll-view scroll-x="true">
          <view class="line5-cont" style="display:inline-flex;whit-space:nowrap">
            <view class="box">
              <view class="image"><image :src="bigBoss" mode=""></image></view>
              <view class="cril">大掌柜</view>
              <view class="texts">{{creatorData.directFriendsAddV4Num}}人</view>
            </view>
            <view class="box">
              <view class="image"><image :src="partner" mode=""></image></view>
              <view class="cril">合伙人商户</view>
              <view class="texts">{{creatorData.directFriendsAddV3Num}}人</view>
            </view>
            <view class="box">
              <view class="image"><image :src="business" mode=""></image></view>
              <view class="cril">商户</view>
              <view class="texts">{{creatorData.directFriendsAddV2Num}}人</view>
            </view>
            <view class="box">
              <view class="image"><image :src="intelligent" mode=""></image></view>
              <view class="cril">达人</view>
              <view class="texts">{{creatorData.directFriendsAddV1Num}}人</view>
            </view>
            <view class="box">
              <view class="image"><image :src="member" mode=""></image></view>
              <view class="cril">普通用户</view>
              <view class="texts">{{creatorData.directFriendsAddV0Num}}人</view>
            </view>
          </view>
        </scroll-view>
      </view>
    </block>
    <!-- 审核相关弹窗 -->
    <uni-popup class="join-pop" ref="popup" type="center" :maskClick="false" :show="
    (!popUpDate.licenseData && myInfo.isHaveLicense == 3 ) || (!popUpDate.storeData && myInfo.isHaveStore == 2) || (!popUpDate.yseasypayData && myInfo.isHaveEasypay == 1) || (!popUpDate.firstTrialData && myInfo.isHaveEasypay == 2) || (!popUpDate.yLeasypayData && myInfo.isHaveStoreCollect  == 3) || (!popUpDate.yLfirstTrialData && myInfo.isHaveStoreCollect  == 2) || (!popUpDate.yLContractData && myInfo.isHaveStoreCollect  == 6) || (myInfo.isPassUserQualification == 2 || myInfo.isPassUserQualification == 3)">
      <view class="pop-box">
        <!-- 营业执照 -->
        <view class="" v-if="!popUpDate.licenseData && myInfo.isHaveLicense == 3">
          <view class="pop-box-close" @click="closePop(1)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/join-big-2.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <view class="pop-box-status" v-show="myInfo.isHaveLicense == 3">营业执照审核驳回</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.licenseAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(1,'skip')">重新申请</button>
          </view>
        </view>
        <!-- 营业执照通过后才会有店铺 -->
        <view class="" v-else-if="!popUpDate.storeData && myInfo.isHaveStore == 2">
          <view class="pop-box-close" @click="closePop(2)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/join-big-2.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <view class="pop-box-status" v-show="myInfo.isHaveStore == 2">店铺审核驳回</view>
          <!-- <view class="pop-box-status" v-show="myInfo.isHaveStore == -1">店铺审核驳回</view> -->
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.storeAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(2,'skip')">重新申请</button>
          </view>
        </view>
        <!-- 易生--店铺通过之后才会有收款码 易生驳回状态：1 --> 
        <view class="" v-else-if="!popUpDate.yseasypayData && myInfo.isHaveEasypay == 1">
          <view class="pop-box-close" @click="closePop(3)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/join-big-2.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 易生收款码 -->
          <view class="pop-box-status" v-show="myInfo.isHaveEasypay == 1">易生收款码审核驳回</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.easypayAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(3,'skip')">重新申请</button>
          </view>
        </view>
        <!-- 银联--店铺通过之后才会有收款码 银联驳回：3 -->
        <view class="" v-else-if="!popUpDate.yLeasypayData && myInfo.isHaveStoreCollect  == 3">
          <view class="pop-box-close" @click="closePop(4)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/join-big-2.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 银联收款码 -->
          <view class="pop-box-status" v-show="myInfo.isHaveStoreCollect  == 3">银联收款码审核驳回</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.storeCollectAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(4,'skip')">重新申请</button>
          </view>
        </view>
        <!-- 易生收款码初审成功 易生初审：2-->
        <view class="" v-else-if="!popUpDate.firstTrialData && myInfo.isHaveEasypay  == 2">
          <view class="pop-box-close" @click="closePop(5)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/pay_fail.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 银联收款码 -->
          <view class="pop-box-status" v-show="myInfo.isHaveEasypay == 2">易生收款码初审成功</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">请点击签订协议，之后您将会收到易生支付发送的电子版《特约商户（三方）受理支付业务协议》的短信信息，需要企业法定代表人/申请人点击短信链接完成电子签约。</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(5,'skip')">签订协议</button>
          </view>
        </view>
        <!-- 银联--店铺通过之后才会有收款码 银联补充资料 -->
        <view class="" v-else-if ="!popUpDate.yLfirstTrialData && (myInfo.isHaveStoreCollect == 2 || myInfo.isHaveStoreCollect == 6)">
          <view class="pop-box-close" @click="closePop(6)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/pay_fail.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 银联收款码 -->
          <view class="pop-box-status" v-show="myInfo.isHaveStoreCollect  == 2">银联收款码审核成功</view>
          <!-- 审核备注 -->
          <!-- <view class="pop-box-cont">{{myInfo.storeCollectAuditRemark}}</view> -->
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(6,'skip')">去补充资料</button>
          </view>
        </view>
        <!-- 银联--店铺通过之后才会有收款码 银联补充资料 -->
        <view class="" v-else-if ="!popUpDate.yLContractData && myInfo.isHaveStoreCollect == 6">
          <view class="pop-box-close" @click="closePop(7)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view>
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/pay_fail.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 银联收款码 -->
          <view class="pop-box-status" v-show="myInfo.isHaveStoreCollect  == 6">合同资料审核驳回</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.storeCollectAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(7,'skip')">去补充资料</button>
          </view>
        </view>
        <!-- 加盟入驻时----资质审核状态 -->
        <!-- isPassUserQualification：2==>审核失败  3==>审核驳回 -->
        <view class="" v-else-if ="myInfo.isPassUserQualification == 2 || myInfo.isPassUserQualification == 3">
          <!-- <view class="pop-box-close" @click="closePop(8)">
            <image style="width: 25rpx; height: 25rpx;" :src="$store.state.imgBaseUrl + '/icon/icon_delete.png'"></image>
          </view> -->
          <view class="pop-box-top">
            <image style="width: 276rpx; height: 276rpx;" :src="$store.state.imgBaseUrl + '/pay_fail.png'" mode=""></image>
          </view>
          <!-- 审核状态 -->
          <!-- 银联收款码 -->
          <view class="pop-box-status" v-if="myInfo.isPassUserQualification == 2">加盟入驻资质审核失败</view>
          <view class="pop-box-status" v-if="myInfo.isPassUserQualification == 3">加盟入驻资质审核驳回</view>
          <!-- 审核备注 -->
          <view class="pop-box-cont">{{myInfo.userQualificationAuditRemark}}</view>
          <view class="pop-box-footer">
            <button type="primary" class="sub-btn sub2" @click="closePop(8,'skip')">重新申请</button>
          </view>
        </view>
      </view>
    </uni-popup>
    
    <uni-popup class="join-pop" ref="explainPopup" type="center" :maskClick="false" :show="isExplain">
      <view class="pop-box-explain">
        <view class="nounTitleBox">
          <view class="nounTitle">{{curExplain.name}}</view>
        </view>
        <view class="nounContent">
          <!-- <view class="nounContent-tit">[{{curExplain.name}}]</view> -->
          <view class="nounContent-txt">
            {{curExplain.content}}
          </view>
        </view>
        <view class="pop-box-footer">
          <button type="primary" class="sub-btn sub2" @click="isExplain = false">确认</button>
        </view>
      </view>
    </uni-popup>
    
    <!-- 免费商户未认证 -->
    <!-- <uni-popup class="new-pop-style" ref="changePhonePop" type="center" :maskClick="modal.maskClick" :show="modal.show"> -->
    <view class="new-pop-style" v-if="modal.show">
      <view class="new-pop-box">
        <view class="pop-tit">温馨提示</view>
        <view class="pop-conter">
          <view>您还未进行企业认证，无法享受到商户的相关权益！</view>
          <view>认证需准备的材料如下：</view>
          <view>1、营业执照照片；</view>
          <view>2、营业执照的法人身份证正反面。</view>
        </view>
        <view class="pop-foot">
          <view class="btn" @click="modal.show = false">稍后认证</view>
          <view class="btn cur" @click="gotoAuth">立即认证</view>
        </view>
      </view>
    </view>
    <!-- </uni-popup> -->
    <!-- 月度账单提醒 -->
    <view class="remind" v-if="billShow" @click="goMonthnBill">
      <view style="margin-right: auto;">您的{{billMonth}}月账单已生成</view>
      <view>点击查看</view>
      <view class="arrow"></view>
    </view>
    <view class="remind" v-if="withDrawShow" @click="gowithdraw">
      <view style="margin-right: auto;">您账户的余额可提现了，请提供与提现金额等额的发票</view>
      <view>提现</view>
      <view class="arrow"></view>
    </view>
  </view>
</template>
<script>
import uniPopup from "@/components/uni-popup/components/uni-popup/uni-popup.vue"
import { findBusinessData, creatorCentreData } from '@/service/home/home.service.js'
import { decideEnv, setWxConfigSync, isIOS } from '@/unit/common.js';
import { PersonalCenter } from '@/service/user/user.service.js';
import { findResult } from '@/service/join/join.service.js'
export default {
  components: { uniPopup },
  data () {
    return {
      isAct: false,
      isSide: null,
      isExplain: false,
      contText: '社区电商商户经营数据',
      bgImage: this.$store.state.imgBaseUrl + '/home-bg.png',
      bigBoss: this.$store.state.imgBaseUrl + '/myTeam/bigBoss.png',
      partner: this.$store.state.imgBaseUrl + '/myTeam/partner.png',
      business: this.$store.state.imgBaseUrl + '/myTeam/business.png',
      intelligent: this.$store.state.imgBaseUrl + '/myTeam/intelligent.png',
      member: this.$store.state.imgBaseUrl + '/myTeam/member.png',
      dateType: 0, // 时间段 0>今日 1>本周 2>本月
      topLList: { // 头部图标
        shop: [
          {img: this.$store.state.imgBaseUrl + '/h-sys.png', text: '扫一扫', value: 'scan'},
          {img: this.$store.state.imgBaseUrl + '/h-sy.png', text: '爆品核销', url: '/pages/billingDetail/gathering'},
          {img: this.$store.state.imgBaseUrl + '/h-zc.png', text: '收款明细',url: '/pages/gatheringRecord/index'},
          {img: this.$store.state.imgBaseUrl + '/h-code.png', text: '码集合', url: '/pages/qrCode/index'},
        ],
        creator: [
          {img: this.$store.state.imgBaseUrl + '/h-haoyou.png', text: '创客好友',url:'/pages/clientManage/index'},
          {img: this.$store.state.imgBaseUrl + '/h-zichan.png', text: '我的资产', url:'/pages/property/myProperty'},
          {img: this.$store.state.imgBaseUrl + '/h-shouyi.png', text: '创客收益',url:'/pages/linkEarnings/myEarnings'},
          {img: this.$store.state.imgBaseUrl + '/h-code.png', text: '码集合', url: '/pages/qrCode/index'},
        ]
      },
      drawTop: [],
      shopData: null,
      creatorData: null,
      homeType: null,
      popUpDate: {
        licenseData:'', // 营业执照
        storeData:'', // 店铺驳回
        yseasypayData:'', // 易生收款码驳回
        firstTrialData:'', // 易生初审成功
        yLeasypayData:'', // 银联收款码驳回
        yLfirstTrialData:'',// 银联收款码初审成功
        yLContractData: '',// 银联合同资料审核驳回
        joinApplyData: '' // 加盟入驻资质审核驳回
      },
      startDate: '', // 当前开始时间
      endDate: '', // 当前结束时间
      weekStartDate: '', // 本周开始时间
      weekEndDate: '', // 本周结束时间
      monthStartDate: '', // 本月开始时间
      monthendDate: '', // 本月结束时间
      freeStore: null, //是否是免费入驻商户
      modal: {
        show: false,
        maskClick: false
      },
      myInfo: {},
      billMonth: 1,
      billShow: false, // 账单提现
      withDrawShow: false,// 提现提醒
      explainList: [
        {name: '预计收益', content: '预收益为平台预先结算给收益人的一类收益统称，该部分收益不作为最终进入到余额的标准，仅用于收益结算的参考值'},
        {name: '现金到账额（元）', content: '现金到账额是指营业流水中扣除平台服务费后，直接汇入到商户指定银行账户的流水部分，即用户选择使用微信、支付宝付款的部分流水。'},
        {name: '平台到账额（元）', content: '平台到账额是指营业流水中扣除平台服务费后，转入到商户平台账户余额（非银行账户）的流水部分，即用户使用现金余额支付成功后，平台将此笔流水转入到商户的现金余额内，同理，红包余额支付转入到商户的红包余额内。'},
        {name: '收款总营业额（元）', content: '总营业额指商户通过社区电商收款码收款的总流水金额（尚未扣除平台服务费），收款方式包含微信、支付宝、现金余额、红包余额支付。'},
      ],
      curExplain: {}
    }
  },
  // computed: {
  //   myInfo() {
  //     return this.$store.state.userInfo;
  //   }
  // },
  onShow() {
    this.$store.dispatch('getUserInfo').then(res => {
      this.myInfo = res;
      this.isSide = uni.getStorageSync('homeType'); // 获取首页的默认类型
      this.freeStore = uni.getStorageSync('freeStore');
      if (this.freeStore == 1 && this.myInfo.rank < 2) {
        this.isSide = 'shop';
        // this.setHomeType() // 存储首页的类型
      } else {
        if (!this.isSide) {
          this.isSide = 'creator';
          this.setHomeType() // 存储首页的类型
        }
      }
      this.drawTop = this.topLList[this.isSide];
      this.isSide == 'shop' ? this.getShopDatas() : this.getCreatorDatas();
      this.isSide == 'shop' ? this.contText = '社区电商商户经营数据' : this.contText = '创客收益';
    })
    this.popUpDate.licenseData = uni.getStorageSync('licenseKey'); // --营业执照
    this.popUpDate.storeData = uni.getStorageSync('storeKey'); // --店铺驳回
    this.popUpDate.yseasypayData = uni.getStorageSync('yseasypayKey'); // 易生收款码--驳回
    this.popUpDate.yLeasypayData = uni.getStorageSync('yLeasypayKey'); // 银联收款码--驳回
    this.popUpDate.firstTrialData = uni.getStorageSync('firstTrialKey'); // 易生收款码--初审成功
    this.popUpDate.yLfirstTrialData = uni.getStorageSync('yLfirstTrialKey'); // 银联收款码 -- 审核成功 --去补充资料
    this.popUpDate.yLContractData = uni.getStorageSync('yLContractKey'); // 银联补充资料--合同资料驳回
    // 查询当月日期判断是否线上账单提现
    var date = new Date();
    var day = date.getDate();
    this.billMonth = date.getMonth() === 0 ? 12 : date.getMonth()
    if (day >= 1 && day <= 5) {
      this.billShow = true
    } else {
      this.billShow = false
    }
    if (day >= 6 && day <= 15) {
      this.withDrawShow = true
    } else {
      this.withDrawShow = false
    }
  },
  methods: {
    goMonthnBill () {
      uni.navigateTo({
        url: '/pages/billingDetail/monthBill'
      })
    },
    gowithdraw() {
      uni.navigateTo({
        url: '/pages/cashWithDrawal/index'
      })
    },
    gotoAuth () {
      this.modal.show = false;
      uni.navigateTo({
        url: '/pages/freeStore/index?inviteId=' + this.myInfo.inviteId
      })
    },
    openExplain (index) {
      this.curExplain = this.explainList[index];
      this.isExplain = true;
    },
    setHomeType () {
      uni.setStorage({
        key: 'homeType',
        data: this.isSide
      })
    },
    changeSide (t) {
      // 切换商户/创客
      this.dateType = 0;
      this.isSide = t;
      this.drawTop = this.topLList[t];
      t == 'shop' ? this.contText = '社区电商商户经营数据' : this.contText = '创客收益';
      t == 'shop' ? this.getShopDatas() : this.getCreatorDatas();
      this.setHomeType();
    },
    changeDate (t) {
      // 切换时间段
      this.dateType = t;
      this.isSide == 'shop' ? this.getShopDatas() : this.getCreatorDatas()
    },
    getShopDatas () {
      let params = {
        id: this.dateType
      }
      findBusinessData(params, (res) => {
        if (res.status == 0) {
          this.shopData = res.data;
        } else if (res.status == 5) {
          this.modal.show = true;
        } else {
          uni.showToast({
            title: res.msg,
            icon: 'none'
          });
        }
      });
    },
    getCreatorDatas () {
      let params = {
        id: this.dateType
      }
      creatorCentreData(params, (res) => {
        if (res.status == 0) {
          this.creatorData = res.data;
        } else if (res.status == 5) {
          this.modal.show = true;
        } else {
          uni.showToast({
            title: res.msg,
            icon: 'none'
          });
        }
      })
    },
    // tab 跳转页面
    drawTopClick (item) {
      let that = this;
      if (item.value == 'scan') { // 扫一扫
        if (decideEnv() && decideEnv() == 'wx' && !isIOS()) {
          setWxConfigSync().then(jswx => {
            jswx.scanQRCode({
              needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
              scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码，默认二者都有
              success: function (res) {
                let result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                // #ifdef H5
                window.open(result, '_self');
                // #endif
              }
            });
          });
        } else if (decideEnv() && decideEnv() == 'wx' && isIOS()) {
          that.$jswx.ready(function () {
            that.$jswx.scanQRCode({
              needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
              scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码，默认二者都有
              success: function (res) {
                let result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                // #ifdef H5
                window.open(result, '_self');
                // #endif
              }
            });
          });
        }
      } else {
        if (item.url) {
          uni.navigateTo({
            url: item.url
          });
        }
      } 
    },
    // 关闭弹框 X && 点击btn跳转
    closePop (type,val) { // 关闭弹窗 1：营业执照驳回  2:店铺驳回 3:易生驳回 4:银联驳回 5: 收款码初审成功
      switch(type) {
      case 1:
        // 营业执照 -- 驳回
        uni.setStorage({
          key: 'licenseKey',
          data: 'licenseData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/certificationReplenish/updateLicense?status=1'
              });
            }
          }
        })
        break;
      case 2:
        // 店铺审核 -驳回
        uni.setStorage({
          key: 'storeKey',
          data: 'storeData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/storeManage/index?status=1'
              });
            }
          }
        })
        break;
      case 3:
        // 易生-收款码审核--驳回
        uni.setStorage({
          key: 'yseasypayKey',
          data: 'yseasypayData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/qrCode/applyEasypay/step1'
              });
            }
          }
        })
        break;
      case 4:
        // 银联-收款码审核--驳回
        uni.setStorage({
          key: 'yLeasypayKey',
          data: 'yLeasypayData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/qrCode/applyBank/step1'
              });
            }
          }
        })
        break;
      case 5:
        // 易生--收款初审通过
        uni.setStorage({
          key: 'firstTrialKey',
          data: 'firstTrialData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/qrCode/applyEasypay/success'
              });
            }
          }
        })
        break;
      case 6:
        // 银联审核通过--补充资料 
        uni.setStorage({
          key: 'yLfirstTrialKey',
          data: 'yLfirstTrialData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/qrCode/applyBank/success'
              });
            }
          }
        })
        break;
      case 7:
        // 银联审核通过--补充合同 
        uni.setStorage({
          key: 'yLContractKey',
          data: 'yLContractData',
          success: function () {
            if (val) {
              uni.navigateTo({
                url: '/pages/qrCode/applyBank/uploadFile'
              });
            }
          }
        })
        break;
      case 8:
        // 银联审核通过--补充合同 
        findResult({}, res => {
          if (res.status == 0) {
            if (res.data.userQualification2mVo.status == 2 || res.data.userQualification2mVo.status == 3){
              let type = res.data.userQualification2mVo.joinType == 0 ? 'enterprise' : 'person';
              res.data.userQualification2mVo['rank'] = res.data.upgradeRank; //存储加盟的等级
              res.data.userQualification2mVo['joinId'] = res.data.id; //存储该商户的加盟id
              res.data.userQualification2mVo['joinStatus'] = 4; //存储被驳回的状态，和外层res.data.status状态保持一致，方便统一处理
              uni.setStorage({ // 存储加盟信息
                key: 'recomposeDatas',
                data: res.data.userQualification2mVo, // 资质信息
                success: () => {
                  uni.reLaunch({
                    url: '/pages/join/identityAuthen?type=' + type
                  })
                }
              })
            }
          }
        })
        break;
      }
      this.$refs.popup.close();
    },
    showDetail(){
      uni.setStorage({
        key: 'noSettlementInfo',
        data: this.creatorData.noSettlementInfoVoList
      })
      uni.navigateTo({
        url: '/pages/index/team'
      });
    },
    // 创客中心--直接好友
    directFriendsClick (val) {// 1:直接好友  2:好友总人数
      if (val == 1) {
        uni.navigateTo({
          url: '/pages/index/recommendFriend?id=' + this.dateType
        });
      } else {
        uni.navigateTo({
          url: '/pages/index/recommendFriend?id=' + 3
        });
      }
    },
    // 创客中心跳转
    haveReceive (val) { // 0：今日，1：本周，2：本月
      if (val == 'today') {
        if (this.dateType == 0) { 
          this.getSystemDate();
          console.log(this.startDate)
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.startDate + '&endDate=' + this.endDate + '&status=' + 3
          });
        } else if (this.dateType == 1) {
          this.getWeek(); //本周时间
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.weekStartDate + '&endDate=' + this.weekEndDate + '&status=' + 3
          });
        } else if (this.dateType == 2) {
          this.getMonth();
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.monthStartDate + '&endDate=' + this.monthendDate + '&status=' + 3
          });
        }
      } else {
        if (this.dateType == 0) { 
          this.getSystemDate();
          console.log(this.startDate)
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.startDate + '&endDate=' + this.endDate + '&status=' + 1
          });
        } else if (this.dateType == 1) {
          this.getWeek(); //本周时间
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.weekStartDate + '&endDate=' + this.weekEndDate + '&status=' + 1
          });
        } else if (this.dateType == 2) {
          this.getMonth();
          uni.navigateTo({
            url: '/pages/linkEarnings/myEarnings?beginDate=' + this.monthStartDate + '&endDate=' + this.monthendDate + '&status=' + 1
          });
        }
      }
    },
    //商户端跳转 --收款明细
    gatheringClick () { // 0：今日，1：本周，2：本月
      if (this.dateType == 0) { 
        this.getSystemDate();
        console.log(this.startDate)
        uni.navigateTo({
          url: '/pages/gatheringRecord/index?beginDate=' + this.startDate + '&endDate=' + this.endDate
        });
      } else if (this.dateType == 1) {
        this.getWeek(); //本周时间
        uni.navigateTo({
          url: '/pages/gatheringRecord/index?beginDate=' + this.weekStartDate + '&endDate=' + this.weekEndDate
        });
      } else if (this.dateType == 2) {
        this.getMonth();
        uni.navigateTo({
          url: '/pages/gatheringRecord/index?beginDate=' + this.monthStartDate + '&endDate=' + this.monthendDate
        });
      }
    },
    // 商户跳转--爆品核销--待核销
    hotMarket () { // 0：今日，1：本周，2：本月
      if (this.dateType == 0) { 
        this.getSystemDate();
        console.log(this.startDate)
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.startDate + '&endDate=' + this.endDate + '&tabNumIndex=' + 0
        });
      } else if (this.dateType == 1) {
        this.getWeek(); //本周时间
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.weekStartDate + '&endDate=' + this.weekEndDate + '&tabNumIndex=' + 0
        });
      } else if (this.dateType == 2) {
        this.getMonth();
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.monthStartDate + '&endDate=' + this.monthendDate + '&tabNumIndex=' + 0
        });
      }
    },
    // 商户跳转--爆品核销--已核销
    hotVerify () {
      if (this.dateType == 0) { 
        this.getSystemDate();
        console.log(this.startDate)
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.startDate + '&endDate=' + this.endDate + '&tabNumIndex=' + 1
        });
      } else if (this.dateType == 1) {
        this.getWeek(); //本周时间
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.weekStartDate + '&endDate=' + this.weekEndDate + '&tabNumIndex=' + 1
        });
      } else if (this.dateType == 2) {
        this.getMonth();
        uni.navigateTo({
          url: '/pages/billingDetail/gathering?beginDate=' + this.monthStartDate + '&endDate=' + this.monthendDate + '&tabNumIndex=' + 1
        });
      }
    },
    
    // 获取当前时间
    getSystemDate(){  
      var systemDate = new Date();  
      // 获取当年  
      var year = systemDate.getFullYear();  
      // 获取当月 （月+1是因为js中月份是按0开始的）  
      var month = systemDate.getMonth() + 1;  
      // 获取当日  
      var day =  systemDate.getDate();  
      if (day < 10) { // 如果日小于10，前面拼接0  
        day = '0' + day;  
      }  
      if (month < 10) { // 如果月小于10，前面拼接0  
        month = '0' + month;  
      }
      this.startDate = `${year}-${month}-${day}`;
      this.endDate = `${year}-${month}-${day}`;
    },
    
    // 获取本周日期
    getWeek(Fn) { 
      //按周日为一周的最后一天计算  
      var date = new Date();  
      //今天是这周的第几天  
      var today = date.getDay();  
      //上周日距离今天的天数（负数表示）  
      var stepSunDay = -today + 1;  
      // 如果今天是周日  
      if (today == 0) {  
        stepSunDay = -7;  
      }  
      // 周一距离今天的天数（负数表示）  
      var stepMonday = 7 - today;  
      var time = date.getTime();  
      var monday = new Date(time + stepSunDay * 24 * 3600 * 1000);  
      var sunday = new Date(time + stepMonday * 24 * 3600 * 1000);  
      //本周一的日期 （起始日期）  
      var startDate = this.transferDate(monday); // 日期变换  
      //本周日的日期 （结束日期）  
      var endDate = this.transferDate(sunday); // 日期变换 
      this.weekStartDate = startDate;
      this.weekEndDate = endDate;
    },
    
    // 获取本月日期
    getMonth(Fn) {  
      // 获取当前月的第一天  
      var start = new Date();  
      start.setDate(1);  
      // 获取当前月的最后一天  
      var date = new Date();  
      var currentMonth = date.getMonth();  
      var nextMonth = ++currentMonth;  
      var nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);  
      var oneDay = 1000 * 60 * 60 * 24;  
      var end = new Date(nextMonthFirstDay - oneDay);  
      var startDate = this.transferDate(start); // 日期变换  
      var endDate = this.transferDate(end); // 日期变换  
      this.monthStartDate = startDate; 
      this.monthendDate = endDate;
    },
    
    // 日期计算 
    transferDate(date) {
      // 年  
      var year = date.getFullYear();  
      // 月  
      var month = date.getMonth() + 1;  
      // 日  
      var day = date.getDate();  
      if (month >= 1 && month <= 9) {  
        month = "0" + month;  
      }  
      if (day >= 0 && day <= 9) {  
        day = "0" + day;  
      }  
      var dateString = year + '-' + month + '-' + day;  
      return dateString;
    }
  }
}
</script>
<style scoped lang="scss">
  .home-new-cont {
    width : 670rpx;
    background-color: #FFFFFF;
    margin: -94rpx auto 0;
    padding-bottom: 34rpx;
    border-radius: 16rpx;
    .home-new-cont-top {
      width: 100%;
      height: 360rpx;
      position: relative;
      box-shadow: 0px 2rpx 2rpx 0px rgba(0,0,0,0.1);
      border-radius: 16rpx;
    }
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 32rpx;
      font-weight: 500;
      font-family:PingFangSC-Medium,PingFang SC;
      color: rgba(51,51,51,1);
      padding: 32rpx 30rpx 0 32rpx;
      border-radius: 16rpx;
      .common-tab {
        margin-top: 0;
        font-size: 26rpx;
        font-weight: normal;
        font-family:PingFangSC-Regular,PingFang SC;
        .common-tab-text {
          color: #9B9EA0;
          &.active {
            color: #C2AC78;
            &:after {
              width: 48rpx;
              height: 4rpx;
              background-color: #C2AC78;
              bottom: -8rpx;
              left: 2rpx;
              opacity: 1;
            }
          }
        }
      }
    }
    .card-box-top {
      margin-top: 40rpx;
      text-align: center;
    }
    .text-arr {
      font-size: 24rpx;
      font-weight: 400;
      font-family:PingFangSC-Regular,PingFang SC;
      color: rgba(155,158,160,1);
      .price {
        font-size: 48rpx;
        font-weight: 500;
        color: rgba(51,51,51,1);
        margin-top: 6rpx;
        font-family:PingFangSC-Medium,PingFang SC;
      }
      .text {
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    .card-box-bot {
      width: 670rpx;
      position: absolute;
      left: 0;
      bottom: 0;
      height: 154rpx;
      background: linear-gradient(180deg,rgba(255,246,227,0) 0%,rgba(254,242,218,0.64) 100%);
      display: flex;
      justify-content: space-around;
      align-items: center;
      text-align: center;
      border-radius: 16rpx;
      .text-arr {
        .price {
          font-size: 36rpx;
          font-weight: 500;
          
        }
      }
      .line {
        width: 4rpx;
        height: 26rpx;
        background-color: #CCCCCC;
      }
    }
    .line2 {
      font-size: 24rpx;
      text-align: center;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 30rpx;
      margin-top: 34rpx;
      font-size: 24rpx;
      color: rgba(155,158,160,1);
      font-family:PingFangSC-Regular,PingFang SC;
      .texts2 {
        font-size: 36rpx;
        color: #333333;
        margin-top: 8rpx;
        font-weight: 500;
        font-family: PingFangSC-Medium,PingFang SC;
      }
      .line {
        width: 2rpx;
        height: 20rpx;
        background-color: #CCCCCC;
      }
      
    }
  }
  .mt20 {
    width: 100%;
    height: 20rpx;
    background-color: #F7F7F7;
  }
  .line3 {
    width: 670rpx;
    margin-top: 20rpx;
    margin: 20rpx auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    &-box {
      width: 264rpx;
      height: 152rpx;
      background: rgba(255,255,255,1);
      box-shadow: 0px 2rpx 2rpx 0px rgba(0,0,0,0.1);
      border-radius: 16rpx;
      padding: 0 30rpx;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      .img {
        width: 68rpx;
        height: 68rpx;
        margin-right: 20rpx;
        flex-shrink: 0;
      }
      .text1 {
        font-size: 24rpx;
        font-family: PingFangSC-Regular,PingFang SC;
        // font-weight: 400;
        color: rgba(155,158,160,1);
        .val {
          color: #999999;
          margin-top: 20rpx;
          line-height: 26rpx;
          font-size: 36rpx;
          font-weight: 500;
          color: rgba(51,51,51,1);
          font-family:PingFangSC-Medium,PingFang SC;
        }
      }
    }
  }
  .question {
    width: 24rpx;
    height: 24rpx;
    margin-left: 16rpx;
  }
  .line6 {
    margin: 0 30rpx;
    padding: 32rpx 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    &-nub {
     width: 280rpx;
     text-align: left;
     font-size: 24rpx;
     color: #999999;
     background:rgba(247,247,247,1);
     border-radius:10rpx;
     padding: 20rpx 0 20rpx 21rpx;
     .nub1 {
       font-size: 36rpx;
       color: #333333;
       margin-bottom: 10rpx;
     }
    }
    &-rect {
     width: 2rpx;
     height: 55rpx;
     background: #E1E1E1;
     margin: 0 45rpx 0 45rpx;
    }
  }
  .line5 {
    margin-top: 40rpx;
    padding-left: 30rpx;
    padding-right: 20rpx;
    &-tit {
      font-size: 26rpx;
      color: #333333;
      margin-bottom: 27rpx;
    }
    &-cont {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      margin-bottom: 20rpx;
      .box {
        width: 140rpx;
        height: 180rpx;
        background:rgba(247,247,247,1);
        border-radius:10rpx;
        margin-right: 10rpx;
        padding-top: 24rpx;
        text-align: center;
        .cril {
          margin: 15rpx 0 22rpx 0;
        }
        .image {
          width: 44rpx;
          height: 44rpx;
          margin: auto;
        }
        .texts {
          font-size: 22rpx;
        }
      }
    }
  }
   
  .question-f {
    display: flex;
    align-items: center;
    .question {
      width: 24rpx;
      height: 24rpx;
      margin-left: 10rpx;
     }
  }
  .remind{
    position: fixed;
    bottom: calc(50px + env(safe-area-inset-bottom));
    width: 750rpx;
    height: 60rpx;
    line-height: 60rpx;
    background: #FEF0BE;
    color: #825617;
    padding: 0 20rpx;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 22rpx;
    .arrow{
      width: 16rpx;
      height: 16rpx;
      border-top: 1px solid #825617;
      border-right: 1px solid #825617;
      transform: rotate(45deg);
      margin-left: 20rpx;
    }
  }
  image {
    width: 100%;
    height: 100%;
  }
  .common-tab {
    width: 260rpx;
    margin-top: 39rpx;
    padding-left: 30rpx;
  }
  .tag-line4 {
    width: 600rpx;
    margin: 29rpx auto 0;
  }
  .home {
    min-height: calc(100vh - 50px);
    background-color: #FFFFFF;
    font-size: 24rpx;
    color: #333333;
    padding-bottom: 28rpx;
    &-top {
      height: 296rpx;
      padding: 28rpx 0rpx;
      background-repeat: no-repeat;
      background-size: 100% 100%;
      background: linear-gradient(315deg,rgba(116,115,116,1) 0%,rgba(45,45,45,1) 100%);
      &-con {
        display: flex;
        justify-content: center;
        align-items: center;
        .list {
           flex: 1;
          // width: 136rpx;
          // text-align: center;
          display: flex;
          flex-flow: column;
          justify-content: center;
          align-items: center;
          .img {
            width: 64rpx;
            height: 64rpx;
            margin: 0 auto;
          }
          .text {
            text-align: center;
            display: block;
            width: 100%;
            font-size: 20rpx;
            color: #FFFFFF;
          }
          &:last-of-type {
            margin-right: 15rpx;
          }
        }
      }
      &-tab {
        margin-top: 40rpx;
        margin-right: 35rpx;
        display: flex;
        justify-content: flex-end;
        &-box {
          width: 280rpx;
          height: 50rpx;
          line-height: 50rpx;
          border: 1rpx solid #C2AC78;
          border-radius: 24rpx;
          overflow: hidden;
          display: flex;
          justify-content: center;
          align-items: center;
          .box {
            width: 50%;
            height: 100%;
            color: #C2AC78;
            text-align: center;
            font-size: 24rpx;
            &.active {
              color: #FFFFFF;
              background-color: #C2AC78;
            }
          }
         
        }
      }
    }
  }
.pop-box {
  width: 500rpx;
  &-top {
    font-size: 30rpx;
    color: #333333;
    font-weight:500;
    margin-top: 26rpx;
    text-align: center;
    position: relative;
  }
  &-close {
    width: 25rpx;
    height: 25rpx;
    top: 20rpx;
    right: 20rpx;
    position: absolute;
  }
  &-cont {
    padding: 0 40rpx 66rpx 40rpx;
    font-size:26rpx;
    font-weight:bold;
    color:rgba(153,153,153,1);
  }
  .hint-text {
    font-size:24rpx;
    font-weight:500;
    color:rgba(67,67,67,1);
    text-align: center;
    margin-bottom: 16rpx;
  }
  &-status {
    text-align: center;
    font-size:36rpx;
    padding: 44rpx 0;
    font-weight:500;
    color:rgba(51,51,51,1);
  }
  &-footer {
    display: flex;
    justify-content: space-between;
    .sub-btn {
      width: 260rpx;
      height: 60rpx;
      line-height: 60rpx;
      color: #F6DA99;
      font-size: 24rpx;
      background-color: #434343;
      border: none;
      &.yellow {
        width: 180rpx;
        background-color: #F6DA99;
        color: #434343;
      }
      &.sub2 {
        width: 100%;
      }
    }
  }
}
.pop-box-explain {
  .nounTitleBox {
    // border-bottom: 1rpx solid #E1E1E1;
    margin: 0 15rpx;
    .nounTitle {
      font-size: 32rpx;
      color:rgba(51,51,51,1);
      padding: 10rpx 0 0;
      text-align: center;
    }
  }
  .nounContent {
    padding: 26rpx 30rpx 40rpx;
    .nounContent-tit {
      font-size: 28rpx;
      font-weight: 600;
    }
    .nounContent-txt {
      font-size: 28rpx;
      color: #999999;
    }
  }
  &-footer {
    display: flex;
    justify-content: space-between;
    .sub-btn {
      width: 260rpx;
      height: 60rpx;
      line-height: 60rpx;
      color: #F6DA99;
      font-size: 24rpx;
      background-color: #434343;
      border: none;
      &.yellow {
        width: 180rpx;
        background-color: #F6DA99;
        color: #434343;
      }
      &.sub2 {
        width: 100%;
      }
    }
  }
}
</style>